<?php

/**
 * default actions.
 *
 * @package    elearning
 * @subpackage default
 * @author     Your name here
 * @version    SVN: $Id: actions.class.php 12479 2008-10-31 10:54:40Z fabien $
 */
class defaultActions extends sfActions
{
	/**
	* Executes index action
	*
	* @param sfRequest $request A request object
	*/
	public function executeIndex(sfWebRequest $request)
	{
		//Breadcrumb add items
		//prestaBreadcrumb::getInstance()->addItem('Article', '@article');
		if(!$request->getParameter('sf_culture')) {
			$a = explode('_',sfConfig::get('sf_default_culture'));
			$this->redirect('@homepage?sf_culture='.$a[0]);
		}
	}
	
	public function executeContact(sfWebRequest $request)
	{
		//Breadcrumb add items
		prestaBreadcrumb::getInstance()->addItem($this->getContext()->getI18N()->__('Contact Us'), '@contact');
		$this->rows = StaticContentPeer::getStaticPage('contact');
	}
	
}
